package com.heima.article.feign;

import com.heima.api.feign.ApArticleFeignClient;
import com.heima.article.service.ArticleService;
import com.heima.model.article.dtos.ArticleDto;
import com.heima.model.common.dtos.ResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;

/**
 * TODO
 *
 * @Author mr.zhao
 * @Date 2025/6/22 16:15
 */
// @RestController
public class ArticleClient implements ApArticleFeignClient {

	@Autowired
	private ArticleService articleService;
	/**
	 * 保存三剑客
	 *
	 * @param dto
	 * @return
	 */
	@PostMapping("/api/v1/article/save")
	@Override
	public ResponseResult save(ArticleDto dto) {
		return articleService.save(dto);
	}
}
